package cn.wolfcode.shop.service;

import cn.wolfcode.shop.result.CodeMsg;
import cn.wolfcode.shop.ws.WebScoketServer;
import com.alibaba.dubbo.config.annotation.Service;

import java.io.IOException;

/**
 * Created by wolfcode-lanxw
 */
@Service(async = true)
public class WebScoketServiceImpl implements IWebScoketService {
    @Override
    public void sendMessage(String uuid, CodeMsg codeMsg) {
        try {
            WebScoketServer.sendMessage(uuid,codeMsg);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
